import java.util.*;

/**
 * @author LKQ
 * @date 2022/7/12 9:39
 * @description 分别使用数组统计行 列的增加情况
 */
public class Solution2 {
    public static void main(String[] args) {

    }
    public int oddCells(int m, int n, int[][] indices) {
        int[] rows = new int[m];
        int[] cols = new int[n];
        for (int[] index : indices) {
            rows[index[0]]++;
            cols[index[1]]++;
        }
        int res = 0;
        for (int i = 0; i < m; i++) {
            for (int j = 0; j < n; j++) {
                if (((rows[i] + cols[j]) & 1) != 0) {
                    res++;
                }
            }
        }
        return res;
    }
}
